﻿using System;
using System.IO;
using System.Reflection;
using log4net;
using log4net.Config;

namespace UwaySoft.EsheetServer.BizLogic
{
    public class Log
    {
        private static readonly ILog Loger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

        public static void SetLogConfig(string configFile)
        {
            XmlConfigurator.ConfigureAndWatch(new FileInfo(configFile));
        }

        public static void Error(Exception exception)
        {
            Loger.Error("Error", exception);
        }

        public static void Info(string Info)
        {
            Loger.Info(Info);
        }

        public static void Debug(string Debug)
        {
            Loger.Debug(Debug);
        }
    }
}
